package com.zxl.web;

import com.zxl.bean.Position;
import com.zxl.service.PositionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

@Controller
public class PositionController {

    @Autowired
    private PositionService positionService;
    @RequestMapping("/positionfindall")
    public String findall(HttpServletRequest request){

        List<Position> positions = positionService.findall();
        request.setAttribute("positions",positions);
        return "zhaopin/demo1/list";
    }
}
